<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示影藏元素display</title>

    <style>

        .peppa {
            /* 隐藏元素并且不占位置:none-隐藏 block-显示 */
            display: none;
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        .george {
            width: 200px;
            height: 200px;
            background-color: skyblue;
        }

    </style>

</head>
<body>

    <img src="display-元素显示与隐藏.png" alt="">
    <br><br>
    
    <div class="peppa">佩奇</div>
    <div class="george">乔治</div>

</body>
</html>